package gang.org.springframework.framework.metadata;

import java.lang.annotation.Annotation;

public abstract class GangMergedAnnotationSelectors
{
    private static final GangMergedAnnotationSelector<?> NEAREST = new Nearest();

    private static final GangMergedAnnotationSelector<?> FIRST_DIRECTLY_DECLARED= new FirstDirectlyDeclared();


    //TODO
    private static class Nearest implements GangMergedAnnotationSelector<Annotation>
    {
        @Override
        public GangMergedAnnotation<Annotation> select(GangMergedAnnotation<Annotation> existing, GangMergedAnnotation<Annotation> condidate) {
            return null;
        }
    }

    public static<A extends Annotation> GangMergedAnnotationSelector<A> firstDirectlyDeclared()
    {
        return (GangMergedAnnotationSelector<A>) FIRST_DIRECTLY_DECLARED;
    }

    //TODO
    private static class  FirstDirectlyDeclared implements GangMergedAnnotationSelector<Annotation>
    {

        @Override
        public GangMergedAnnotation<Annotation> select(GangMergedAnnotation<Annotation> existing, GangMergedAnnotation<Annotation> condidate) {
            return null;
        }

        @Override
        public boolean isBestCandidate(GangMergedAnnotation<Annotation> annotation) {
            //TODO
            return true;
        }
    }
}
